package com.demo.bigdata

import org.apache.spark.{SparkConf, SparkContext}

object DistinctDemo {
  def main(args: Array[String]): Unit = {
    val conf = (new SparkConf).setMaster("local").setAppName("Demo");
    val sc = new SparkContext(conf)
    val lines = sc.parallelize(List("hadoop","hive","spark","hive","sqoop"))
    val result = lines.distinct()
    result.foreach(println(_))
  }
}
